// import {getComponentList} from "@/api/dict";

export const operateList = [
  {
    name: $i18n.t('common.add'),
    type: 'primary',
    icon: 'el-icon-circle-plus-outline',
    handleName: 'add', //点击时返回的标识
  }
]
export const rowConfig = [
  {
    name: '编辑',
    type: 'primary',
    class: 'row-btn-primary',
    handleName: 'edit', //点击时返回的标识
  },

  {
    name: '删除',
    type: 'danger',
    class: 'row-btn-danger',
    handleName: 'delete', //点击时返回的标识
  }
]
export const subRowConfig = [
  {
    name: '编辑',
    type: 'primary',
    class: 'row-btn-primary',
    handleName: 'editSub', //点击时返回的标识
  },

  {
    name: '删除',
    type: 'danger',
    class: 'row-btn-danger',
    handleName: 'deleteSub', //点击时返回的标识
  }
]
export const sub2RowConfig = [
  {
    name: '删除',
    type: 'danger',
    class: 'row-btn-danger',
    handleName: 'deleteSub2', //点击时返回的标识
  }
]
// 主表查询条件
export const formConfig = {
  inline: true,
  formDesc: {
    partSystem: {
      type: 'input',
      label: '所属系统',
      layout: 6
    },
    partGroup: {
      type: 'input',
      label: '分组',
      layout: 6
    },
    partsName: {
      type: 'input',
      label: '部件',
      layout: 6
    }
  }
}
export const formDescDialog = {
  span: 24,
  formDesc: {
    partSystem: {
      type: 'input',
      label: '所属系统',
      layout: 24,
      required: true
    },
    partGroup: {
      type: 'input',
      label: '分组',
      layout: 24,
      required: true
    },
    partsName: {
      type: 'input',
      label: '部件',
      layout: 24,
      required: true
    }
  }
}
export const formConfigDialog = {
  span: 24,
  formDesc: {
    systemFlag: {
      type: 'select',
      label: $i18n.t('dict.systemFlag'),
      layout: 24,
      required: true,
      options: (data) => {
        return [
          {
            text: $i18n.t('common.yes'),
            value: '1'
          },
          {
            text: $i18n.t('common.no'),
            value: '0'
          }
        ]
      }
    }
  }
}
export const formDescDialogSub = {
  span: 24,
  formDesc: {
    descFirst: {
      type: 'input',
      label: '一级描述',
      layout: 24,
      required: true
    },
    descSecond: {
      type: 'input',
      label: '二级描述',
      layout: 24,
    },
    priority:{
      type: "number",
      label: '优先级',
      layout: 24,
    },
  }
}
